home *** CD-ROM | disk | FTP | other *** search
/ Teach Your Children: Road Construction Ahead / Teach Your Children: Road Construction Ahead.iso / pc / rca / road.dxr / 00033_ColorCursor Class.ls < prev    next >
Encoding:
Text File  |  1996-07-17  |  790 b   |  36 lines

  1. property channel, type
  2. global gActorList, gCustomCursor
  3.  
  4. on birth me, cursorCastnumber, typeSymbol, cursorChannel
  5.   set type to typeSymbol
  6.   if voidp(cursorChannel) then
  7.     set channel to 48
  8.   else
  9.     set channel to cursorChannel
  10.   end if
  11.   set the castNum of sprite channel to cursorCastnumber
  12.   puppetSprite(channel, 1)
  13.   cursor(200)
  14.   set gCustomCursor to me
  15. end
  16.  
  17. on update me
  18.   set the locH of sprite channel to the mouseH
  19.   set the locV of sprite channel to the mouseV
  20.   puppetTempo(60)
  21. end
  22.  
  23. on changeCursor me, cursorCastnumber
  24.   set the castNum of sprite channel to cursorCastnumber
  25. end
  26.  
  27. on dispose me
  28.   removeSprite(channel)
  29.   set actorPos to getPos(gActorList, me)
  30.   if actorPos <> 0 then
  31.     deleteAt(gActorList, actorPos)
  32.   end if
  33.   cursor(-1)
  34.   set gCustomCursor to EMPTY
  35. end
  36.